﻿using System;
using System.Data;
using System.Text;
using System.Data.SqlClient;
using hsgsSHXX.DBUtility;//Please add references
using System.Collections.Generic;
namespace hsgsSHXX.DAL
{
	/// <summary>
	/// 数据访问类:hsrcsc
	/// </summary>
	public partial class hsrcsc
	{
		public hsrcsc()
		{}
		#region  Method



		/// <summary>
		/// 增加一条数据
		/// </summary>
		public bool Add(hsgsSHXX.Model.hsrcsc model)
		{
			StringBuilder strSql=new StringBuilder();
			strSql.Append("insert into hsrcsc(");
			strSql.Append("PERSONID,xm,PERSONTYPE,xb,csrq,PERSONPOLIT,PERSONEDU,ygzdw,PERSONCTYPE,PERSONZHIWU,ydwdz,COMPPERSON,COMPMAN,COMPTEL,PERSONWTYPE,PERSONWPTYPE,xgsmc,PERSONWCTYPE,PERSONPROF1,PERSONPROFDATE,PERSONSET,PERSONAREA,PERSONINDATE,PERSONOUTDATE,PERSONHTBEGDATE,PERSONHTENDDATE,PERSONWORKDATE,PERSONDAF,PERSONDAFJS,PERSONSBF,PERSONSBFJS,PERSONYLF,PERSONYLFJS,PERSONZF,PERSONZFJS,PERSONDF,LIEBIE,sfzh,byyx,bysj,SPEC,hjdz,lxdh,gzjl,PERSONMARRY,PERSONWNAME,PERSONW_COMP,PERSONWTEL,PERSONZHUZHI,PERSONHUKOU,PERSONYLJ,PERSONDNGZ1,PERSONDNGZ2,REMARK1,BIANHAO,RDDATE,ZZDATE,YB,OTHERGL,DISCOUNTGL,ZDBEGIN,ZDEND,PERSONSYJS,PERSONSY,USERNAME,LCAREA,PERSONZIP,OLDCOMP,LIUDTIME,TIAOZTIME,DASAVE,DAOUT,DAOUTTIME,DAOUTNAME,YLJINTIME,YLINTIME,ZFINTIME,SYINTIME,FAMILY,REMARK,PERSONPROF,PERNATION,WTCOMPCODE,DANGAN_GONFZI,BABYINTIME,GSINTIME,PERSONBABY,PERSONBABYJS,PERSONGS,PERSONGSJS,PERSONDFJS,BIANHAOOLD)");
			strSql.Append(" values (");
			strSql.Append("@PERSONID,@xm,@PERSONTYPE,@xb,@csrq,@PERSONPOLIT,@PERSONEDU,@ygzdw,@PERSONCTYPE,@PERSONZHIWU,@ydwdz,@COMPPERSON,@COMPMAN,@COMPTEL,@PERSONWTYPE,@PERSONWPTYPE,@xgsmc,@PERSONWCTYPE,@PERSONPROF1,@PERSONPROFDATE,@PERSONSET,@PERSONAREA,@PERSONINDATE,@PERSONOUTDATE,@PERSONHTBEGDATE,@PERSONHTENDDATE,@PERSONWORKDATE,@PERSONDAF,@PERSONDAFJS,@PERSONSBF,@PERSONSBFJS,@PERSONYLF,@PERSONYLFJS,@PERSONZF,@PERSONZFJS,@PERSONDF,@LIEBIE,@sfzh,@byyx,@bysj,@SPEC,@hjdz,@lxdh,@gzjl,@PERSONMARRY,@PERSONWNAME,@PERSONW_COMP,@PERSONWTEL,@PERSONZHUZHI,@PERSONHUKOU,@PERSONYLJ,@PERSONDNGZ1,@PERSONDNGZ2,@REMARK1,@BIANHAO,@RDDATE,@ZZDATE,@YB,@OTHERGL,@DISCOUNTGL,@ZDBEGIN,@ZDEND,@PERSONSYJS,@PERSONSY,@USERNAME,@LCAREA,@PERSONZIP,@OLDCOMP,@LIUDTIME,@TIAOZTIME,@DASAVE,@DAOUT,@DAOUTTIME,@DAOUTNAME,@YLJINTIME,@YLINTIME,@ZFINTIME,@SYINTIME,@FAMILY,@REMARK,@PERSONPROF,@PERNATION,@WTCOMPCODE,@DANGAN_GONFZI,@BABYINTIME,@GSINTIME,@PERSONBABY,@PERSONBABYJS,@PERSONGS,@PERSONGSJS,@PERSONDFJS,@BIANHAOOLD)");
			SqlParameter[] parameters = {
					new SqlParameter("@PERSONID", SqlDbType.Float,8),
					new SqlParameter("@xm", SqlDbType.NVarChar,255),
					new SqlParameter("@PERSONTYPE", SqlDbType.NVarChar,255),
					new SqlParameter("@xb", SqlDbType.NVarChar,255),
					new SqlParameter("@csrq", SqlDbType.DateTime),
					new SqlParameter("@PERSONPOLIT", SqlDbType.NVarChar,255),
					new SqlParameter("@PERSONEDU", SqlDbType.NVarChar,255),
					new SqlParameter("@ygzdw", SqlDbType.NVarChar,255),
					new SqlParameter("@PERSONCTYPE", SqlDbType.NVarChar,255),
					new SqlParameter("@PERSONZHIWU", SqlDbType.NVarChar,255),
					new SqlParameter("@ydwdz", SqlDbType.NVarChar,255),
					new SqlParameter("@COMPPERSON", SqlDbType.NVarChar,255),
					new SqlParameter("@COMPMAN", SqlDbType.NVarChar,255),
					new SqlParameter("@COMPTEL", SqlDbType.NVarChar,255),
					new SqlParameter("@PERSONWTYPE", SqlDbType.NVarChar,255),
					new SqlParameter("@PERSONWPTYPE", SqlDbType.NVarChar,255),
					new SqlParameter("@xgsmc", SqlDbType.NVarChar,255),
					new SqlParameter("@PERSONWCTYPE", SqlDbType.NVarChar,255),
					new SqlParameter("@PERSONPROF1", SqlDbType.NVarChar,255),
					new SqlParameter("@PERSONPROFDATE", SqlDbType.DateTime),
					new SqlParameter("@PERSONSET", SqlDbType.NVarChar,255),
					new SqlParameter("@PERSONAREA", SqlDbType.NVarChar,255),
					new SqlParameter("@PERSONINDATE", SqlDbType.DateTime),
					new SqlParameter("@PERSONOUTDATE", SqlDbType.DateTime),
					new SqlParameter("@PERSONHTBEGDATE", SqlDbType.DateTime),
					new SqlParameter("@PERSONHTENDDATE", SqlDbType.DateTime),
					new SqlParameter("@PERSONWORKDATE", SqlDbType.DateTime),
					new SqlParameter("@PERSONDAF", SqlDbType.DateTime),
					new SqlParameter("@PERSONDAFJS", SqlDbType.Float,8),
					new SqlParameter("@PERSONSBF", SqlDbType.DateTime),
					new SqlParameter("@PERSONSBFJS", SqlDbType.Float,8),
					new SqlParameter("@PERSONYLF", SqlDbType.DateTime),
					new SqlParameter("@PERSONYLFJS", SqlDbType.Float,8),
					new SqlParameter("@PERSONZF", SqlDbType.NVarChar,255),
					new SqlParameter("@PERSONZFJS", SqlDbType.NVarChar,255),
					new SqlParameter("@PERSONDF", SqlDbType.NVarChar,255),
					new SqlParameter("@LIEBIE", SqlDbType.NVarChar,255),
					new SqlParameter("@sfzh", SqlDbType.NVarChar,255),
					new SqlParameter("@byyx", SqlDbType.NVarChar,255),
					new SqlParameter("@bysj", SqlDbType.DateTime),
					new SqlParameter("@SPEC", SqlDbType.NVarChar,255),
					new SqlParameter("@hjdz", SqlDbType.NVarChar,255),
					new SqlParameter("@lxdh", SqlDbType.NVarChar,255),
					new SqlParameter("@gzjl", SqlDbType.NVarChar,255),
					new SqlParameter("@PERSONMARRY", SqlDbType.NVarChar,255),
					new SqlParameter("@PERSONWNAME", SqlDbType.NVarChar,255),
					new SqlParameter("@PERSONW_COMP", SqlDbType.NVarChar,255),
					new SqlParameter("@PERSONWTEL", SqlDbType.NVarChar,255),
					new SqlParameter("@PERSONZHUZHI", SqlDbType.NVarChar,255),
					new SqlParameter("@PERSONHUKOU", SqlDbType.NVarChar,255),
					new SqlParameter("@PERSONYLJ", SqlDbType.NVarChar,255),
					new SqlParameter("@PERSONDNGZ1", SqlDbType.NVarChar,255),
					new SqlParameter("@PERSONDNGZ2", SqlDbType.NVarChar,255),
					new SqlParameter("@REMARK1", SqlDbType.NVarChar,255),
					new SqlParameter("@BIANHAO", SqlDbType.NVarChar,255),
					new SqlParameter("@RDDATE", SqlDbType.DateTime),
					new SqlParameter("@ZZDATE", SqlDbType.DateTime),
					new SqlParameter("@YB", SqlDbType.NVarChar,255),
					new SqlParameter("@OTHERGL", SqlDbType.NVarChar,255),
					new SqlParameter("@DISCOUNTGL", SqlDbType.NVarChar,255),
					new SqlParameter("@ZDBEGIN", SqlDbType.NVarChar,255),
					new SqlParameter("@ZDEND", SqlDbType.NVarChar,255),
					new SqlParameter("@PERSONSYJS", SqlDbType.NVarChar,255),
					new SqlParameter("@PERSONSY", SqlDbType.NVarChar,255),
					new SqlParameter("@USERNAME", SqlDbType.NVarChar,255),
					new SqlParameter("@LCAREA", SqlDbType.NVarChar,255),
					new SqlParameter("@PERSONZIP", SqlDbType.NVarChar,255),
					new SqlParameter("@OLDCOMP", SqlDbType.NVarChar,255),
					new SqlParameter("@LIUDTIME", SqlDbType.NVarChar,255),
					new SqlParameter("@TIAOZTIME", SqlDbType.NVarChar,255),
					new SqlParameter("@DASAVE", SqlDbType.NVarChar,255),
					new SqlParameter("@DAOUT", SqlDbType.NVarChar,255),
					new SqlParameter("@DAOUTTIME", SqlDbType.NVarChar,255),
					new SqlParameter("@DAOUTNAME", SqlDbType.NVarChar,255),
					new SqlParameter("@YLJINTIME", SqlDbType.NVarChar,255),
					new SqlParameter("@YLINTIME", SqlDbType.NVarChar,255),
					new SqlParameter("@ZFINTIME", SqlDbType.NVarChar,255),
					new SqlParameter("@SYINTIME", SqlDbType.NVarChar,255),
					new SqlParameter("@FAMILY", SqlDbType.NVarChar,255),
					new SqlParameter("@REMARK", SqlDbType.NVarChar,255),
					new SqlParameter("@PERSONPROF", SqlDbType.NVarChar,255),
					new SqlParameter("@PERNATION", SqlDbType.NVarChar,255),
					new SqlParameter("@WTCOMPCODE", SqlDbType.NVarChar,255),
					new SqlParameter("@DANGAN_GONFZI", SqlDbType.NVarChar,255),
					new SqlParameter("@BABYINTIME", SqlDbType.NVarChar,255),
					new SqlParameter("@GSINTIME", SqlDbType.NVarChar,255),
					new SqlParameter("@PERSONBABY", SqlDbType.NVarChar,255),
					new SqlParameter("@PERSONBABYJS", SqlDbType.NVarChar,255),
					new SqlParameter("@PERSONGS", SqlDbType.NVarChar,255),
					new SqlParameter("@PERSONGSJS", SqlDbType.NVarChar,255),
					new SqlParameter("@PERSONDFJS", SqlDbType.NVarChar,255),
					new SqlParameter("@BIANHAOOLD", SqlDbType.NVarChar,255)};
			parameters[0].Value = model.PERSONID;
			parameters[1].Value = model.xm;
			parameters[2].Value = model.PERSONTYPE;
			parameters[3].Value = model.xb;
			parameters[4].Value = model.csrq;
			parameters[5].Value = model.PERSONPOLIT;
			parameters[6].Value = model.PERSONEDU;
			parameters[7].Value = model.ygzdw;
			parameters[8].Value = model.PERSONCTYPE;
			parameters[9].Value = model.PERSONZHIWU;
			parameters[10].Value = model.ydwdz;
			parameters[11].Value = model.COMPPERSON;
			parameters[12].Value = model.COMPMAN;
			parameters[13].Value = model.COMPTEL;
			parameters[14].Value = model.PERSONWTYPE;
			parameters[15].Value = model.PERSONWPTYPE;
			parameters[16].Value = model.xgsmc;
			parameters[17].Value = model.PERSONWCTYPE;
			parameters[18].Value = model.PERSONPROF1;
			parameters[19].Value = model.PERSONPROFDATE;
			parameters[20].Value = model.PERSONSET;
			parameters[21].Value = model.PERSONAREA;
			parameters[22].Value = model.PERSONINDATE;
			parameters[23].Value = model.PERSONOUTDATE;
			parameters[24].Value = model.PERSONHTBEGDATE;
			parameters[25].Value = model.PERSONHTENDDATE;
			parameters[26].Value = model.PERSONWORKDATE;
			parameters[27].Value = model.PERSONDAF;
			parameters[28].Value = model.PERSONDAFJS;
			parameters[29].Value = model.PERSONSBF;
			parameters[30].Value = model.PERSONSBFJS;
			parameters[31].Value = model.PERSONYLF;
			parameters[32].Value = model.PERSONYLFJS;
			parameters[33].Value = model.PERSONZF;
			parameters[34].Value = model.PERSONZFJS;
			parameters[35].Value = model.PERSONDF;
			parameters[36].Value = model.LIEBIE;
			parameters[37].Value = model.sfzh;
			parameters[38].Value = model.byyx;
			parameters[39].Value = model.bysj;
			parameters[40].Value = model.SPEC;
			parameters[41].Value = model.hjdz;
			parameters[42].Value = model.lxdh;
			parameters[43].Value = model.gzjl;
			parameters[44].Value = model.PERSONMARRY;
			parameters[45].Value = model.PERSONWNAME;
			parameters[46].Value = model.PERSONW_COMP;
			parameters[47].Value = model.PERSONWTEL;
			parameters[48].Value = model.PERSONZHUZHI;
			parameters[49].Value = model.PERSONHUKOU;
			parameters[50].Value = model.PERSONYLJ;
			parameters[51].Value = model.PERSONDNGZ1;
			parameters[52].Value = model.PERSONDNGZ2;
			parameters[53].Value = model.REMARK1;
			parameters[54].Value = model.BIANHAO;
			parameters[55].Value = model.RDDATE;
			parameters[56].Value = model.ZZDATE;
			parameters[57].Value = model.YB;
			parameters[58].Value = model.OTHERGL;
			parameters[59].Value = model.DISCOUNTGL;
			parameters[60].Value = model.ZDBEGIN;
			parameters[61].Value = model.ZDEND;
			parameters[62].Value = model.PERSONSYJS;
			parameters[63].Value = model.PERSONSY;
			parameters[64].Value = model.USERNAME;
			parameters[65].Value = model.LCAREA;
			parameters[66].Value = model.PERSONZIP;
			parameters[67].Value = model.OLDCOMP;
			parameters[68].Value = model.LIUDTIME;
			parameters[69].Value = model.TIAOZTIME;
			parameters[70].Value = model.DASAVE;
			parameters[71].Value = model.DAOUT;
			parameters[72].Value = model.DAOUTTIME;
			parameters[73].Value = model.DAOUTNAME;
			parameters[74].Value = model.YLJINTIME;
			parameters[75].Value = model.YLINTIME;
			parameters[76].Value = model.ZFINTIME;
			parameters[77].Value = model.SYINTIME;
			parameters[78].Value = model.FAMILY;
			parameters[79].Value = model.REMARK;
			parameters[80].Value = model.PERSONPROF;
			parameters[81].Value = model.PERNATION;
			parameters[82].Value = model.WTCOMPCODE;
			parameters[83].Value = model.DANGAN_GONFZI;
			parameters[84].Value = model.BABYINTIME;
			parameters[85].Value = model.GSINTIME;
			parameters[86].Value = model.PERSONBABY;
			parameters[87].Value = model.PERSONBABYJS;
			parameters[88].Value = model.PERSONGS;
			parameters[89].Value = model.PERSONGSJS;
			parameters[90].Value = model.PERSONDFJS;
			parameters[91].Value = model.BIANHAOOLD;

			int rows=DbHelperSQL.ExecuteSql(strSql.ToString(),parameters);
			if (rows > 0)
			{
				return true;
			}
			else
			{
				return false;
			}
		}
		/// <summary>
		/// 更新一条数据
		/// </summary>
		public bool Update(hsgsSHXX.Model.hsrcsc model)
		{
			StringBuilder strSql=new StringBuilder();
			strSql.Append("update hsrcsc set ");
			strSql.Append("PERSONID=@PERSONID,");
			strSql.Append("xm=@xm,");
			strSql.Append("PERSONTYPE=@PERSONTYPE,");
			strSql.Append("xb=@xb,");
			strSql.Append("csrq=@csrq,");
			strSql.Append("PERSONPOLIT=@PERSONPOLIT,");
			strSql.Append("PERSONEDU=@PERSONEDU,");
			strSql.Append("ygzdw=@ygzdw,");
			strSql.Append("PERSONCTYPE=@PERSONCTYPE,");
			strSql.Append("PERSONZHIWU=@PERSONZHIWU,");
			strSql.Append("ydwdz=@ydwdz,");
			strSql.Append("COMPPERSON=@COMPPERSON,");
			strSql.Append("COMPMAN=@COMPMAN,");
			strSql.Append("COMPTEL=@COMPTEL,");
			strSql.Append("PERSONWTYPE=@PERSONWTYPE,");
			strSql.Append("PERSONWPTYPE=@PERSONWPTYPE,");
			strSql.Append("xgsmc=@xgsmc,");
			strSql.Append("PERSONWCTYPE=@PERSONWCTYPE,");
			strSql.Append("PERSONPROF1=@PERSONPROF1,");
			strSql.Append("PERSONPROFDATE=@PERSONPROFDATE,");
			strSql.Append("PERSONSET=@PERSONSET,");
			strSql.Append("PERSONAREA=@PERSONAREA,");
			strSql.Append("PERSONINDATE=@PERSONINDATE,");
			strSql.Append("PERSONOUTDATE=@PERSONOUTDATE,");
			strSql.Append("PERSONHTBEGDATE=@PERSONHTBEGDATE,");
			strSql.Append("PERSONHTENDDATE=@PERSONHTENDDATE,");
			strSql.Append("PERSONWORKDATE=@PERSONWORKDATE,");
			strSql.Append("PERSONDAF=@PERSONDAF,");
			strSql.Append("PERSONDAFJS=@PERSONDAFJS,");
			strSql.Append("PERSONSBF=@PERSONSBF,");
			strSql.Append("PERSONSBFJS=@PERSONSBFJS,");
			strSql.Append("PERSONYLF=@PERSONYLF,");
			strSql.Append("PERSONYLFJS=@PERSONYLFJS,");
			strSql.Append("PERSONZF=@PERSONZF,");
			strSql.Append("PERSONZFJS=@PERSONZFJS,");
			strSql.Append("PERSONDF=@PERSONDF,");
			strSql.Append("LIEBIE=@LIEBIE,");
			strSql.Append("sfzh=@sfzh,");
			strSql.Append("byyx=@byyx,");
			strSql.Append("bysj=@bysj,");
			strSql.Append("SPEC=@SPEC,");
			strSql.Append("hjdz=@hjdz,");
			strSql.Append("lxdh=@lxdh,");
			strSql.Append("gzjl=@gzjl,");
			strSql.Append("PERSONMARRY=@PERSONMARRY,");
			strSql.Append("PERSONWNAME=@PERSONWNAME,");
			strSql.Append("PERSONW_COMP=@PERSONW_COMP,");
			strSql.Append("PERSONWTEL=@PERSONWTEL,");
			strSql.Append("PERSONZHUZHI=@PERSONZHUZHI,");
			strSql.Append("PERSONHUKOU=@PERSONHUKOU,");
			strSql.Append("PERSONYLJ=@PERSONYLJ,");
			strSql.Append("PERSONDNGZ1=@PERSONDNGZ1,");
			strSql.Append("PERSONDNGZ2=@PERSONDNGZ2,");
			strSql.Append("REMARK1=@REMARK1,");
			strSql.Append("BIANHAO=@BIANHAO,");
			strSql.Append("RDDATE=@RDDATE,");
			strSql.Append("ZZDATE=@ZZDATE,");
			strSql.Append("YB=@YB,");
			strSql.Append("OTHERGL=@OTHERGL,");
			strSql.Append("DISCOUNTGL=@DISCOUNTGL,");
			strSql.Append("ZDBEGIN=@ZDBEGIN,");
			strSql.Append("ZDEND=@ZDEND,");
			strSql.Append("PERSONSYJS=@PERSONSYJS,");
			strSql.Append("PERSONSY=@PERSONSY,");
			strSql.Append("USERNAME=@USERNAME,");
			strSql.Append("LCAREA=@LCAREA,");
			strSql.Append("PERSONZIP=@PERSONZIP,");
			strSql.Append("OLDCOMP=@OLDCOMP,");
			strSql.Append("LIUDTIME=@LIUDTIME,");
			strSql.Append("TIAOZTIME=@TIAOZTIME,");
			strSql.Append("DASAVE=@DASAVE,");
			strSql.Append("DAOUT=@DAOUT,");
			strSql.Append("DAOUTTIME=@DAOUTTIME,");
			strSql.Append("DAOUTNAME=@DAOUTNAME,");
			strSql.Append("YLJINTIME=@YLJINTIME,");
			strSql.Append("YLINTIME=@YLINTIME,");
			strSql.Append("ZFINTIME=@ZFINTIME,");
			strSql.Append("SYINTIME=@SYINTIME,");
			strSql.Append("FAMILY=@FAMILY,");
			strSql.Append("REMARK=@REMARK,");
			strSql.Append("PERSONPROF=@PERSONPROF,");
			strSql.Append("PERNATION=@PERNATION,");
			strSql.Append("WTCOMPCODE=@WTCOMPCODE,");
			strSql.Append("DANGAN_GONFZI=@DANGAN_GONFZI,");
			strSql.Append("BABYINTIME=@BABYINTIME,");
			strSql.Append("GSINTIME=@GSINTIME,");
			strSql.Append("PERSONBABY=@PERSONBABY,");
			strSql.Append("PERSONBABYJS=@PERSONBABYJS,");
			strSql.Append("PERSONGS=@PERSONGS,");
			strSql.Append("PERSONGSJS=@PERSONGSJS,");
			strSql.Append("PERSONDFJS=@PERSONDFJS,");
			strSql.Append("BIANHAOOLD=@BIANHAOOLD");
			strSql.Append(" where ");
			SqlParameter[] parameters = {
					new SqlParameter("@PERSONID", SqlDbType.Float,8),
					new SqlParameter("@xm", SqlDbType.NVarChar,255),
					new SqlParameter("@PERSONTYPE", SqlDbType.NVarChar,255),
					new SqlParameter("@xb", SqlDbType.NVarChar,255),
					new SqlParameter("@csrq", SqlDbType.DateTime),
					new SqlParameter("@PERSONPOLIT", SqlDbType.NVarChar,255),
					new SqlParameter("@PERSONEDU", SqlDbType.NVarChar,255),
					new SqlParameter("@ygzdw", SqlDbType.NVarChar,255),
					new SqlParameter("@PERSONCTYPE", SqlDbType.NVarChar,255),
					new SqlParameter("@PERSONZHIWU", SqlDbType.NVarChar,255),
					new SqlParameter("@ydwdz", SqlDbType.NVarChar,255),
					new SqlParameter("@COMPPERSON", SqlDbType.NVarChar,255),
					new SqlParameter("@COMPMAN", SqlDbType.NVarChar,255),
					new SqlParameter("@COMPTEL", SqlDbType.NVarChar,255),
					new SqlParameter("@PERSONWTYPE", SqlDbType.NVarChar,255),
					new SqlParameter("@PERSONWPTYPE", SqlDbType.NVarChar,255),
					new SqlParameter("@xgsmc", SqlDbType.NVarChar,255),
					new SqlParameter("@PERSONWCTYPE", SqlDbType.NVarChar,255),
					new SqlParameter("@PERSONPROF1", SqlDbType.NVarChar,255),
					new SqlParameter("@PERSONPROFDATE", SqlDbType.DateTime),
					new SqlParameter("@PERSONSET", SqlDbType.NVarChar,255),
					new SqlParameter("@PERSONAREA", SqlDbType.NVarChar,255),
					new SqlParameter("@PERSONINDATE", SqlDbType.DateTime),
					new SqlParameter("@PERSONOUTDATE", SqlDbType.DateTime),
					new SqlParameter("@PERSONHTBEGDATE", SqlDbType.DateTime),
					new SqlParameter("@PERSONHTENDDATE", SqlDbType.DateTime),
					new SqlParameter("@PERSONWORKDATE", SqlDbType.DateTime),
					new SqlParameter("@PERSONDAF", SqlDbType.DateTime),
					new SqlParameter("@PERSONDAFJS", SqlDbType.Float,8),
					new SqlParameter("@PERSONSBF", SqlDbType.DateTime),
					new SqlParameter("@PERSONSBFJS", SqlDbType.Float,8),
					new SqlParameter("@PERSONYLF", SqlDbType.DateTime),
					new SqlParameter("@PERSONYLFJS", SqlDbType.Float,8),
					new SqlParameter("@PERSONZF", SqlDbType.NVarChar,255),
					new SqlParameter("@PERSONZFJS", SqlDbType.NVarChar,255),
					new SqlParameter("@PERSONDF", SqlDbType.NVarChar,255),
					new SqlParameter("@LIEBIE", SqlDbType.NVarChar,255),
					new SqlParameter("@sfzh", SqlDbType.NVarChar,255),
					new SqlParameter("@byyx", SqlDbType.NVarChar,255),
					new SqlParameter("@bysj", SqlDbType.DateTime),
					new SqlParameter("@SPEC", SqlDbType.NVarChar,255),
					new SqlParameter("@hjdz", SqlDbType.NVarChar,255),
					new SqlParameter("@lxdh", SqlDbType.NVarChar,255),
					new SqlParameter("@gzjl", SqlDbType.NVarChar,255),
					new SqlParameter("@PERSONMARRY", SqlDbType.NVarChar,255),
					new SqlParameter("@PERSONWNAME", SqlDbType.NVarChar,255),
					new SqlParameter("@PERSONW_COMP", SqlDbType.NVarChar,255),
					new SqlParameter("@PERSONWTEL", SqlDbType.NVarChar,255),
					new SqlParameter("@PERSONZHUZHI", SqlDbType.NVarChar,255),
					new SqlParameter("@PERSONHUKOU", SqlDbType.NVarChar,255),
					new SqlParameter("@PERSONYLJ", SqlDbType.NVarChar,255),
					new SqlParameter("@PERSONDNGZ1", SqlDbType.NVarChar,255),
					new SqlParameter("@PERSONDNGZ2", SqlDbType.NVarChar,255),
					new SqlParameter("@REMARK1", SqlDbType.NVarChar,255),
					new SqlParameter("@BIANHAO", SqlDbType.NVarChar,255),
					new SqlParameter("@RDDATE", SqlDbType.DateTime),
					new SqlParameter("@ZZDATE", SqlDbType.DateTime),
					new SqlParameter("@YB", SqlDbType.NVarChar,255),
					new SqlParameter("@OTHERGL", SqlDbType.NVarChar,255),
					new SqlParameter("@DISCOUNTGL", SqlDbType.NVarChar,255),
					new SqlParameter("@ZDBEGIN", SqlDbType.NVarChar,255),
					new SqlParameter("@ZDEND", SqlDbType.NVarChar,255),
					new SqlParameter("@PERSONSYJS", SqlDbType.NVarChar,255),
					new SqlParameter("@PERSONSY", SqlDbType.NVarChar,255),
					new SqlParameter("@USERNAME", SqlDbType.NVarChar,255),
					new SqlParameter("@LCAREA", SqlDbType.NVarChar,255),
					new SqlParameter("@PERSONZIP", SqlDbType.NVarChar,255),
					new SqlParameter("@OLDCOMP", SqlDbType.NVarChar,255),
					new SqlParameter("@LIUDTIME", SqlDbType.NVarChar,255),
					new SqlParameter("@TIAOZTIME", SqlDbType.NVarChar,255),
					new SqlParameter("@DASAVE", SqlDbType.NVarChar,255),
					new SqlParameter("@DAOUT", SqlDbType.NVarChar,255),
					new SqlParameter("@DAOUTTIME", SqlDbType.NVarChar,255),
					new SqlParameter("@DAOUTNAME", SqlDbType.NVarChar,255),
					new SqlParameter("@YLJINTIME", SqlDbType.NVarChar,255),
					new SqlParameter("@YLINTIME", SqlDbType.NVarChar,255),
					new SqlParameter("@ZFINTIME", SqlDbType.NVarChar,255),
					new SqlParameter("@SYINTIME", SqlDbType.NVarChar,255),
					new SqlParameter("@FAMILY", SqlDbType.NVarChar,255),
					new SqlParameter("@REMARK", SqlDbType.NVarChar,255),
					new SqlParameter("@PERSONPROF", SqlDbType.NVarChar,255),
					new SqlParameter("@PERNATION", SqlDbType.NVarChar,255),
					new SqlParameter("@WTCOMPCODE", SqlDbType.NVarChar,255),
					new SqlParameter("@DANGAN_GONFZI", SqlDbType.NVarChar,255),
					new SqlParameter("@BABYINTIME", SqlDbType.NVarChar,255),
					new SqlParameter("@GSINTIME", SqlDbType.NVarChar,255),
					new SqlParameter("@PERSONBABY", SqlDbType.NVarChar,255),
					new SqlParameter("@PERSONBABYJS", SqlDbType.NVarChar,255),
					new SqlParameter("@PERSONGS", SqlDbType.NVarChar,255),
					new SqlParameter("@PERSONGSJS", SqlDbType.NVarChar,255),
					new SqlParameter("@PERSONDFJS", SqlDbType.NVarChar,255),
					new SqlParameter("@BIANHAOOLD", SqlDbType.NVarChar,255)};
			parameters[0].Value = model.PERSONID;
			parameters[1].Value = model.xm;
			parameters[2].Value = model.PERSONTYPE;
			parameters[3].Value = model.xb;
			parameters[4].Value = model.csrq;
			parameters[5].Value = model.PERSONPOLIT;
			parameters[6].Value = model.PERSONEDU;
			parameters[7].Value = model.ygzdw;
			parameters[8].Value = model.PERSONCTYPE;
			parameters[9].Value = model.PERSONZHIWU;
			parameters[10].Value = model.ydwdz;
			parameters[11].Value = model.COMPPERSON;
			parameters[12].Value = model.COMPMAN;
			parameters[13].Value = model.COMPTEL;
			parameters[14].Value = model.PERSONWTYPE;
			parameters[15].Value = model.PERSONWPTYPE;
			parameters[16].Value = model.xgsmc;
			parameters[17].Value = model.PERSONWCTYPE;
			parameters[18].Value = model.PERSONPROF1;
			parameters[19].Value = model.PERSONPROFDATE;
			parameters[20].Value = model.PERSONSET;
			parameters[21].Value = model.PERSONAREA;
			parameters[22].Value = model.PERSONINDATE;
			parameters[23].Value = model.PERSONOUTDATE;
			parameters[24].Value = model.PERSONHTBEGDATE;
			parameters[25].Value = model.PERSONHTENDDATE;
			parameters[26].Value = model.PERSONWORKDATE;
			parameters[27].Value = model.PERSONDAF;
			parameters[28].Value = model.PERSONDAFJS;
			parameters[29].Value = model.PERSONSBF;
			parameters[30].Value = model.PERSONSBFJS;
			parameters[31].Value = model.PERSONYLF;
			parameters[32].Value = model.PERSONYLFJS;
			parameters[33].Value = model.PERSONZF;
			parameters[34].Value = model.PERSONZFJS;
			parameters[35].Value = model.PERSONDF;
			parameters[36].Value = model.LIEBIE;
			parameters[37].Value = model.sfzh;
			parameters[38].Value = model.byyx;
			parameters[39].Value = model.bysj;
			parameters[40].Value = model.SPEC;
			parameters[41].Value = model.hjdz;
			parameters[42].Value = model.lxdh;
			parameters[43].Value = model.gzjl;
			parameters[44].Value = model.PERSONMARRY;
			parameters[45].Value = model.PERSONWNAME;
			parameters[46].Value = model.PERSONW_COMP;
			parameters[47].Value = model.PERSONWTEL;
			parameters[48].Value = model.PERSONZHUZHI;
			parameters[49].Value = model.PERSONHUKOU;
			parameters[50].Value = model.PERSONYLJ;
			parameters[51].Value = model.PERSONDNGZ1;
			parameters[52].Value = model.PERSONDNGZ2;
			parameters[53].Value = model.REMARK1;
			parameters[54].Value = model.BIANHAO;
			parameters[55].Value = model.RDDATE;
			parameters[56].Value = model.ZZDATE;
			parameters[57].Value = model.YB;
			parameters[58].Value = model.OTHERGL;
			parameters[59].Value = model.DISCOUNTGL;
			parameters[60].Value = model.ZDBEGIN;
			parameters[61].Value = model.ZDEND;
			parameters[62].Value = model.PERSONSYJS;
			parameters[63].Value = model.PERSONSY;
			parameters[64].Value = model.USERNAME;
			parameters[65].Value = model.LCAREA;
			parameters[66].Value = model.PERSONZIP;
			parameters[67].Value = model.OLDCOMP;
			parameters[68].Value = model.LIUDTIME;
			parameters[69].Value = model.TIAOZTIME;
			parameters[70].Value = model.DASAVE;
			parameters[71].Value = model.DAOUT;
			parameters[72].Value = model.DAOUTTIME;
			parameters[73].Value = model.DAOUTNAME;
			parameters[74].Value = model.YLJINTIME;
			parameters[75].Value = model.YLINTIME;
			parameters[76].Value = model.ZFINTIME;
			parameters[77].Value = model.SYINTIME;
			parameters[78].Value = model.FAMILY;
			parameters[79].Value = model.REMARK;
			parameters[80].Value = model.PERSONPROF;
			parameters[81].Value = model.PERNATION;
			parameters[82].Value = model.WTCOMPCODE;
			parameters[83].Value = model.DANGAN_GONFZI;
			parameters[84].Value = model.BABYINTIME;
			parameters[85].Value = model.GSINTIME;
			parameters[86].Value = model.PERSONBABY;
			parameters[87].Value = model.PERSONBABYJS;
			parameters[88].Value = model.PERSONGS;
			parameters[89].Value = model.PERSONGSJS;
			parameters[90].Value = model.PERSONDFJS;
			parameters[91].Value = model.BIANHAOOLD;

			int rows=DbHelperSQL.ExecuteSql(strSql.ToString(),parameters);
			if (rows > 0)
			{
				return true;
			}
			else
			{
				return false;
			}
		}

		/// <summary>
		/// 删除一条数据
		/// </summary>
		public bool Delete()
		{
			//该表无主键信息，请自定义主键/条件字段
			StringBuilder strSql=new StringBuilder();
			strSql.Append("delete from hsrcsc ");
			strSql.Append(" where ");
			SqlParameter[] parameters = {
};

			int rows=DbHelperSQL.ExecuteSql(strSql.ToString(),parameters);
			if (rows > 0)
			{
				return true;
			}
			else
			{
				return false;
			}
		}


		/// <summary>
		/// 得到一个对象实体
		/// </summary>
		public hsgsSHXX.Model.hsrcsc GetModel()
		{
			//该表无主键信息，请自定义主键/条件字段
			StringBuilder strSql=new StringBuilder();
			strSql.Append("select  top 1 PERSONID,xm,PERSONTYPE,xb,csrq,PERSONPOLIT,PERSONEDU,ygzdw,PERSONCTYPE,PERSONZHIWU,ydwdz,COMPPERSON,COMPMAN,COMPTEL,PERSONWTYPE,PERSONWPTYPE,xgsmc,PERSONWCTYPE,PERSONPROF1,PERSONPROFDATE,PERSONSET,PERSONAREA,PERSONINDATE,PERSONOUTDATE,PERSONHTBEGDATE,PERSONHTENDDATE,PERSONWORKDATE,PERSONDAF,PERSONDAFJS,PERSONSBF,PERSONSBFJS,PERSONYLF,PERSONYLFJS,PERSONZF,PERSONZFJS,PERSONDF,LIEBIE,sfzh,byyx,bysj,SPEC,hjdz,lxdh,gzjl,PERSONMARRY,PERSONWNAME,PERSONW_COMP,PERSONWTEL,PERSONZHUZHI,PERSONHUKOU,PERSONYLJ,PERSONDNGZ1,PERSONDNGZ2,REMARK1,BIANHAO,RDDATE,ZZDATE,YB,OTHERGL,DISCOUNTGL,ZDBEGIN,ZDEND,PERSONSYJS,PERSONSY,USERNAME,LCAREA,PERSONZIP,OLDCOMP,LIUDTIME,TIAOZTIME,DASAVE,DAOUT,DAOUTTIME,DAOUTNAME,YLJINTIME,YLINTIME,ZFINTIME,SYINTIME,FAMILY,REMARK,PERSONPROF,PERNATION,WTCOMPCODE,DANGAN_GONFZI,BABYINTIME,GSINTIME,PERSONBABY,PERSONBABYJS,PERSONGS,PERSONGSJS,PERSONDFJS,BIANHAOOLD from hsrcsc ");
			strSql.Append(" where ");
			SqlParameter[] parameters = {
};

			hsgsSHXX.Model.hsrcsc model=new hsgsSHXX.Model.hsrcsc();
			DataSet ds=DbHelperSQL.Query(strSql.ToString(),parameters);
			if(ds.Tables[0].Rows.Count>0)
			{
				if(ds.Tables[0].Rows[0]["PERSONID"]!=null && ds.Tables[0].Rows[0]["PERSONID"].ToString()!="")
				{
					model.PERSONID=decimal.Parse(ds.Tables[0].Rows[0]["PERSONID"].ToString());
				}
				if(ds.Tables[0].Rows[0]["xm"]!=null && ds.Tables[0].Rows[0]["xm"].ToString()!="")
				{
					model.xm=ds.Tables[0].Rows[0]["xm"].ToString();
				}
				if(ds.Tables[0].Rows[0]["PERSONTYPE"]!=null && ds.Tables[0].Rows[0]["PERSONTYPE"].ToString()!="")
				{
					model.PERSONTYPE=ds.Tables[0].Rows[0]["PERSONTYPE"].ToString();
				}
				if(ds.Tables[0].Rows[0]["xb"]!=null && ds.Tables[0].Rows[0]["xb"].ToString()!="")
				{
					model.xb=ds.Tables[0].Rows[0]["xb"].ToString();
				}
				if(ds.Tables[0].Rows[0]["csrq"]!=null && ds.Tables[0].Rows[0]["csrq"].ToString()!="")
				{
					model.csrq=DateTime.Parse(ds.Tables[0].Rows[0]["csrq"].ToString());
				}
				if(ds.Tables[0].Rows[0]["PERSONPOLIT"]!=null && ds.Tables[0].Rows[0]["PERSONPOLIT"].ToString()!="")
				{
					model.PERSONPOLIT=ds.Tables[0].Rows[0]["PERSONPOLIT"].ToString();
				}
				if(ds.Tables[0].Rows[0]["PERSONEDU"]!=null && ds.Tables[0].Rows[0]["PERSONEDU"].ToString()!="")
				{
					model.PERSONEDU=ds.Tables[0].Rows[0]["PERSONEDU"].ToString();
				}
				if(ds.Tables[0].Rows[0]["ygzdw"]!=null && ds.Tables[0].Rows[0]["ygzdw"].ToString()!="")
				{
					model.ygzdw=ds.Tables[0].Rows[0]["ygzdw"].ToString();
				}
				if(ds.Tables[0].Rows[0]["PERSONCTYPE"]!=null && ds.Tables[0].Rows[0]["PERSONCTYPE"].ToString()!="")
				{
					model.PERSONCTYPE=ds.Tables[0].Rows[0]["PERSONCTYPE"].ToString();
				}
				if(ds.Tables[0].Rows[0]["PERSONZHIWU"]!=null && ds.Tables[0].Rows[0]["PERSONZHIWU"].ToString()!="")
				{
					model.PERSONZHIWU=ds.Tables[0].Rows[0]["PERSONZHIWU"].ToString();
				}
				if(ds.Tables[0].Rows[0]["ydwdz"]!=null && ds.Tables[0].Rows[0]["ydwdz"].ToString()!="")
				{
					model.ydwdz=ds.Tables[0].Rows[0]["ydwdz"].ToString();
				}
				if(ds.Tables[0].Rows[0]["COMPPERSON"]!=null && ds.Tables[0].Rows[0]["COMPPERSON"].ToString()!="")
				{
					model.COMPPERSON=ds.Tables[0].Rows[0]["COMPPERSON"].ToString();
				}
				if(ds.Tables[0].Rows[0]["COMPMAN"]!=null && ds.Tables[0].Rows[0]["COMPMAN"].ToString()!="")
				{
					model.COMPMAN=ds.Tables[0].Rows[0]["COMPMAN"].ToString();
				}
				if(ds.Tables[0].Rows[0]["COMPTEL"]!=null && ds.Tables[0].Rows[0]["COMPTEL"].ToString()!="")
				{
					model.COMPTEL=ds.Tables[0].Rows[0]["COMPTEL"].ToString();
				}
				if(ds.Tables[0].Rows[0]["PERSONWTYPE"]!=null && ds.Tables[0].Rows[0]["PERSONWTYPE"].ToString()!="")
				{
					model.PERSONWTYPE=ds.Tables[0].Rows[0]["PERSONWTYPE"].ToString();
				}
				if(ds.Tables[0].Rows[0]["PERSONWPTYPE"]!=null && ds.Tables[0].Rows[0]["PERSONWPTYPE"].ToString()!="")
				{
					model.PERSONWPTYPE=ds.Tables[0].Rows[0]["PERSONWPTYPE"].ToString();
				}
				if(ds.Tables[0].Rows[0]["xgsmc"]!=null && ds.Tables[0].Rows[0]["xgsmc"].ToString()!="")
				{
					model.xgsmc=ds.Tables[0].Rows[0]["xgsmc"].ToString();
				}
				if(ds.Tables[0].Rows[0]["PERSONWCTYPE"]!=null && ds.Tables[0].Rows[0]["PERSONWCTYPE"].ToString()!="")
				{
					model.PERSONWCTYPE=ds.Tables[0].Rows[0]["PERSONWCTYPE"].ToString();
				}
				if(ds.Tables[0].Rows[0]["PERSONPROF1"]!=null && ds.Tables[0].Rows[0]["PERSONPROF1"].ToString()!="")
				{
					model.PERSONPROF1=ds.Tables[0].Rows[0]["PERSONPROF1"].ToString();
				}
				if(ds.Tables[0].Rows[0]["PERSONPROFDATE"]!=null && ds.Tables[0].Rows[0]["PERSONPROFDATE"].ToString()!="")
				{
					model.PERSONPROFDATE=DateTime.Parse(ds.Tables[0].Rows[0]["PERSONPROFDATE"].ToString());
				}
				if(ds.Tables[0].Rows[0]["PERSONSET"]!=null && ds.Tables[0].Rows[0]["PERSONSET"].ToString()!="")
				{
					model.PERSONSET=ds.Tables[0].Rows[0]["PERSONSET"].ToString();
				}
				if(ds.Tables[0].Rows[0]["PERSONAREA"]!=null && ds.Tables[0].Rows[0]["PERSONAREA"].ToString()!="")
				{
					model.PERSONAREA=ds.Tables[0].Rows[0]["PERSONAREA"].ToString();
				}
				if(ds.Tables[0].Rows[0]["PERSONINDATE"]!=null && ds.Tables[0].Rows[0]["PERSONINDATE"].ToString()!="")
				{
					model.PERSONINDATE=DateTime.Parse(ds.Tables[0].Rows[0]["PERSONINDATE"].ToString());
				}
				if(ds.Tables[0].Rows[0]["PERSONOUTDATE"]!=null && ds.Tables[0].Rows[0]["PERSONOUTDATE"].ToString()!="")
				{
					model.PERSONOUTDATE=DateTime.Parse(ds.Tables[0].Rows[0]["PERSONOUTDATE"].ToString());
				}
				if(ds.Tables[0].Rows[0]["PERSONHTBEGDATE"]!=null && ds.Tables[0].Rows[0]["PERSONHTBEGDATE"].ToString()!="")
				{
					model.PERSONHTBEGDATE=DateTime.Parse(ds.Tables[0].Rows[0]["PERSONHTBEGDATE"].ToString());
				}
				if(ds.Tables[0].Rows[0]["PERSONHTENDDATE"]!=null && ds.Tables[0].Rows[0]["PERSONHTENDDATE"].ToString()!="")
				{
					model.PERSONHTENDDATE=DateTime.Parse(ds.Tables[0].Rows[0]["PERSONHTENDDATE"].ToString());
				}
				if(ds.Tables[0].Rows[0]["PERSONWORKDATE"]!=null && ds.Tables[0].Rows[0]["PERSONWORKDATE"].ToString()!="")
				{
					model.PERSONWORKDATE=DateTime.Parse(ds.Tables[0].Rows[0]["PERSONWORKDATE"].ToString());
				}
				if(ds.Tables[0].Rows[0]["PERSONDAF"]!=null && ds.Tables[0].Rows[0]["PERSONDAF"].ToString()!="")
				{
					model.PERSONDAF=DateTime.Parse(ds.Tables[0].Rows[0]["PERSONDAF"].ToString());
				}
				if(ds.Tables[0].Rows[0]["PERSONDAFJS"]!=null && ds.Tables[0].Rows[0]["PERSONDAFJS"].ToString()!="")
				{
					model.PERSONDAFJS=decimal.Parse(ds.Tables[0].Rows[0]["PERSONDAFJS"].ToString());
				}
				if(ds.Tables[0].Rows[0]["PERSONSBF"]!=null && ds.Tables[0].Rows[0]["PERSONSBF"].ToString()!="")
				{
					model.PERSONSBF=DateTime.Parse(ds.Tables[0].Rows[0]["PERSONSBF"].ToString());
				}
				if(ds.Tables[0].Rows[0]["PERSONSBFJS"]!=null && ds.Tables[0].Rows[0]["PERSONSBFJS"].ToString()!="")
				{
					model.PERSONSBFJS=decimal.Parse(ds.Tables[0].Rows[0]["PERSONSBFJS"].ToString());
				}
				if(ds.Tables[0].Rows[0]["PERSONYLF"]!=null && ds.Tables[0].Rows[0]["PERSONYLF"].ToString()!="")
				{
					model.PERSONYLF=DateTime.Parse(ds.Tables[0].Rows[0]["PERSONYLF"].ToString());
				}
				if(ds.Tables[0].Rows[0]["PERSONYLFJS"]!=null && ds.Tables[0].Rows[0]["PERSONYLFJS"].ToString()!="")
				{
					model.PERSONYLFJS=decimal.Parse(ds.Tables[0].Rows[0]["PERSONYLFJS"].ToString());
				}
				if(ds.Tables[0].Rows[0]["PERSONZF"]!=null && ds.Tables[0].Rows[0]["PERSONZF"].ToString()!="")
				{
					model.PERSONZF=ds.Tables[0].Rows[0]["PERSONZF"].ToString();
				}
				if(ds.Tables[0].Rows[0]["PERSONZFJS"]!=null && ds.Tables[0].Rows[0]["PERSONZFJS"].ToString()!="")
				{
					model.PERSONZFJS=ds.Tables[0].Rows[0]["PERSONZFJS"].ToString();
				}
				if(ds.Tables[0].Rows[0]["PERSONDF"]!=null && ds.Tables[0].Rows[0]["PERSONDF"].ToString()!="")
				{
					model.PERSONDF=ds.Tables[0].Rows[0]["PERSONDF"].ToString();
				}
				if(ds.Tables[0].Rows[0]["LIEBIE"]!=null && ds.Tables[0].Rows[0]["LIEBIE"].ToString()!="")
				{
					model.LIEBIE=ds.Tables[0].Rows[0]["LIEBIE"].ToString();
				}
				if(ds.Tables[0].Rows[0]["sfzh"]!=null && ds.Tables[0].Rows[0]["sfzh"].ToString()!="")
				{
					model.sfzh=ds.Tables[0].Rows[0]["sfzh"].ToString();
				}
				if(ds.Tables[0].Rows[0]["byyx"]!=null && ds.Tables[0].Rows[0]["byyx"].ToString()!="")
				{
					model.byyx=ds.Tables[0].Rows[0]["byyx"].ToString();
				}
				if(ds.Tables[0].Rows[0]["bysj"]!=null && ds.Tables[0].Rows[0]["bysj"].ToString()!="")
				{
					model.bysj=DateTime.Parse(ds.Tables[0].Rows[0]["bysj"].ToString());
				}
				if(ds.Tables[0].Rows[0]["SPEC"]!=null && ds.Tables[0].Rows[0]["SPEC"].ToString()!="")
				{
					model.SPEC=ds.Tables[0].Rows[0]["SPEC"].ToString();
				}
				if(ds.Tables[0].Rows[0]["hjdz"]!=null && ds.Tables[0].Rows[0]["hjdz"].ToString()!="")
				{
					model.hjdz=ds.Tables[0].Rows[0]["hjdz"].ToString();
				}
				if(ds.Tables[0].Rows[0]["lxdh"]!=null && ds.Tables[0].Rows[0]["lxdh"].ToString()!="")
				{
					model.lxdh=ds.Tables[0].Rows[0]["lxdh"].ToString();
				}
				if(ds.Tables[0].Rows[0]["gzjl"]!=null && ds.Tables[0].Rows[0]["gzjl"].ToString()!="")
				{
					model.gzjl=ds.Tables[0].Rows[0]["gzjl"].ToString();
				}
				if(ds.Tables[0].Rows[0]["PERSONMARRY"]!=null && ds.Tables[0].Rows[0]["PERSONMARRY"].ToString()!="")
				{
					model.PERSONMARRY=ds.Tables[0].Rows[0]["PERSONMARRY"].ToString();
				}
				if(ds.Tables[0].Rows[0]["PERSONWNAME"]!=null && ds.Tables[0].Rows[0]["PERSONWNAME"].ToString()!="")
				{
					model.PERSONWNAME=ds.Tables[0].Rows[0]["PERSONWNAME"].ToString();
				}
				if(ds.Tables[0].Rows[0]["PERSONW_COMP"]!=null && ds.Tables[0].Rows[0]["PERSONW_COMP"].ToString()!="")
				{
					model.PERSONW_COMP=ds.Tables[0].Rows[0]["PERSONW_COMP"].ToString();
				}
				if(ds.Tables[0].Rows[0]["PERSONWTEL"]!=null && ds.Tables[0].Rows[0]["PERSONWTEL"].ToString()!="")
				{
					model.PERSONWTEL=ds.Tables[0].Rows[0]["PERSONWTEL"].ToString();
				}
				if(ds.Tables[0].Rows[0]["PERSONZHUZHI"]!=null && ds.Tables[0].Rows[0]["PERSONZHUZHI"].ToString()!="")
				{
					model.PERSONZHUZHI=ds.Tables[0].Rows[0]["PERSONZHUZHI"].ToString();
				}
				if(ds.Tables[0].Rows[0]["PERSONHUKOU"]!=null && ds.Tables[0].Rows[0]["PERSONHUKOU"].ToString()!="")
				{
					model.PERSONHUKOU=ds.Tables[0].Rows[0]["PERSONHUKOU"].ToString();
				}
				if(ds.Tables[0].Rows[0]["PERSONYLJ"]!=null && ds.Tables[0].Rows[0]["PERSONYLJ"].ToString()!="")
				{
					model.PERSONYLJ=ds.Tables[0].Rows[0]["PERSONYLJ"].ToString();
				}
				if(ds.Tables[0].Rows[0]["PERSONDNGZ1"]!=null && ds.Tables[0].Rows[0]["PERSONDNGZ1"].ToString()!="")
				{
					model.PERSONDNGZ1=ds.Tables[0].Rows[0]["PERSONDNGZ1"].ToString();
				}
				if(ds.Tables[0].Rows[0]["PERSONDNGZ2"]!=null && ds.Tables[0].Rows[0]["PERSONDNGZ2"].ToString()!="")
				{
					model.PERSONDNGZ2=ds.Tables[0].Rows[0]["PERSONDNGZ2"].ToString();
				}
				if(ds.Tables[0].Rows[0]["REMARK1"]!=null && ds.Tables[0].Rows[0]["REMARK1"].ToString()!="")
				{
					model.REMARK1=ds.Tables[0].Rows[0]["REMARK1"].ToString();
				}
				if(ds.Tables[0].Rows[0]["BIANHAO"]!=null && ds.Tables[0].Rows[0]["BIANHAO"].ToString()!="")
				{
					model.BIANHAO=ds.Tables[0].Rows[0]["BIANHAO"].ToString();
				}
				if(ds.Tables[0].Rows[0]["RDDATE"]!=null && ds.Tables[0].Rows[0]["RDDATE"].ToString()!="")
				{
					model.RDDATE=DateTime.Parse(ds.Tables[0].Rows[0]["RDDATE"].ToString());
				}
				if(ds.Tables[0].Rows[0]["ZZDATE"]!=null && ds.Tables[0].Rows[0]["ZZDATE"].ToString()!="")
				{
					model.ZZDATE=DateTime.Parse(ds.Tables[0].Rows[0]["ZZDATE"].ToString());
				}
				if(ds.Tables[0].Rows[0]["YB"]!=null && ds.Tables[0].Rows[0]["YB"].ToString()!="")
				{
					model.YB=ds.Tables[0].Rows[0]["YB"].ToString();
				}
				if(ds.Tables[0].Rows[0]["OTHERGL"]!=null && ds.Tables[0].Rows[0]["OTHERGL"].ToString()!="")
				{
					model.OTHERGL=ds.Tables[0].Rows[0]["OTHERGL"].ToString();
				}
				if(ds.Tables[0].Rows[0]["DISCOUNTGL"]!=null && ds.Tables[0].Rows[0]["DISCOUNTGL"].ToString()!="")
				{
					model.DISCOUNTGL=ds.Tables[0].Rows[0]["DISCOUNTGL"].ToString();
				}
				if(ds.Tables[0].Rows[0]["ZDBEGIN"]!=null && ds.Tables[0].Rows[0]["ZDBEGIN"].ToString()!="")
				{
					model.ZDBEGIN=ds.Tables[0].Rows[0]["ZDBEGIN"].ToString();
				}
				if(ds.Tables[0].Rows[0]["ZDEND"]!=null && ds.Tables[0].Rows[0]["ZDEND"].ToString()!="")
				{
					model.ZDEND=ds.Tables[0].Rows[0]["ZDEND"].ToString();
				}
				if(ds.Tables[0].Rows[0]["PERSONSYJS"]!=null && ds.Tables[0].Rows[0]["PERSONSYJS"].ToString()!="")
				{
					model.PERSONSYJS=ds.Tables[0].Rows[0]["PERSONSYJS"].ToString();
				}
				if(ds.Tables[0].Rows[0]["PERSONSY"]!=null && ds.Tables[0].Rows[0]["PERSONSY"].ToString()!="")
				{
					model.PERSONSY=ds.Tables[0].Rows[0]["PERSONSY"].ToString();
				}
				if(ds.Tables[0].Rows[0]["USERNAME"]!=null && ds.Tables[0].Rows[0]["USERNAME"].ToString()!="")
				{
					model.USERNAME=ds.Tables[0].Rows[0]["USERNAME"].ToString();
				}
				if(ds.Tables[0].Rows[0]["LCAREA"]!=null && ds.Tables[0].Rows[0]["LCAREA"].ToString()!="")
				{
					model.LCAREA=ds.Tables[0].Rows[0]["LCAREA"].ToString();
				}
				if(ds.Tables[0].Rows[0]["PERSONZIP"]!=null && ds.Tables[0].Rows[0]["PERSONZIP"].ToString()!="")
				{
					model.PERSONZIP=ds.Tables[0].Rows[0]["PERSONZIP"].ToString();
				}
				if(ds.Tables[0].Rows[0]["OLDCOMP"]!=null && ds.Tables[0].Rows[0]["OLDCOMP"].ToString()!="")
				{
					model.OLDCOMP=ds.Tables[0].Rows[0]["OLDCOMP"].ToString();
				}
				if(ds.Tables[0].Rows[0]["LIUDTIME"]!=null && ds.Tables[0].Rows[0]["LIUDTIME"].ToString()!="")
				{
					model.LIUDTIME=ds.Tables[0].Rows[0]["LIUDTIME"].ToString();
				}
				if(ds.Tables[0].Rows[0]["TIAOZTIME"]!=null && ds.Tables[0].Rows[0]["TIAOZTIME"].ToString()!="")
				{
					model.TIAOZTIME=ds.Tables[0].Rows[0]["TIAOZTIME"].ToString();
				}
				if(ds.Tables[0].Rows[0]["DASAVE"]!=null && ds.Tables[0].Rows[0]["DASAVE"].ToString()!="")
				{
					model.DASAVE=ds.Tables[0].Rows[0]["DASAVE"].ToString();
				}
				if(ds.Tables[0].Rows[0]["DAOUT"]!=null && ds.Tables[0].Rows[0]["DAOUT"].ToString()!="")
				{
					model.DAOUT=ds.Tables[0].Rows[0]["DAOUT"].ToString();
				}
				if(ds.Tables[0].Rows[0]["DAOUTTIME"]!=null && ds.Tables[0].Rows[0]["DAOUTTIME"].ToString()!="")
				{
					model.DAOUTTIME=ds.Tables[0].Rows[0]["DAOUTTIME"].ToString();
				}
				if(ds.Tables[0].Rows[0]["DAOUTNAME"]!=null && ds.Tables[0].Rows[0]["DAOUTNAME"].ToString()!="")
				{
					model.DAOUTNAME=ds.Tables[0].Rows[0]["DAOUTNAME"].ToString();
				}
				if(ds.Tables[0].Rows[0]["YLJINTIME"]!=null && ds.Tables[0].Rows[0]["YLJINTIME"].ToString()!="")
				{
					model.YLJINTIME=ds.Tables[0].Rows[0]["YLJINTIME"].ToString();
				}
				if(ds.Tables[0].Rows[0]["YLINTIME"]!=null && ds.Tables[0].Rows[0]["YLINTIME"].ToString()!="")
				{
					model.YLINTIME=ds.Tables[0].Rows[0]["YLINTIME"].ToString();
				}
				if(ds.Tables[0].Rows[0]["ZFINTIME"]!=null && ds.Tables[0].Rows[0]["ZFINTIME"].ToString()!="")
				{
					model.ZFINTIME=ds.Tables[0].Rows[0]["ZFINTIME"].ToString();
				}
				if(ds.Tables[0].Rows[0]["SYINTIME"]!=null && ds.Tables[0].Rows[0]["SYINTIME"].ToString()!="")
				{
					model.SYINTIME=ds.Tables[0].Rows[0]["SYINTIME"].ToString();
				}
				if(ds.Tables[0].Rows[0]["FAMILY"]!=null && ds.Tables[0].Rows[0]["FAMILY"].ToString()!="")
				{
					model.FAMILY=ds.Tables[0].Rows[0]["FAMILY"].ToString();
				}
				if(ds.Tables[0].Rows[0]["REMARK"]!=null && ds.Tables[0].Rows[0]["REMARK"].ToString()!="")
				{
					model.REMARK=ds.Tables[0].Rows[0]["REMARK"].ToString();
				}
				if(ds.Tables[0].Rows[0]["PERSONPROF"]!=null && ds.Tables[0].Rows[0]["PERSONPROF"].ToString()!="")
				{
					model.PERSONPROF=ds.Tables[0].Rows[0]["PERSONPROF"].ToString();
				}
				if(ds.Tables[0].Rows[0]["PERNATION"]!=null && ds.Tables[0].Rows[0]["PERNATION"].ToString()!="")
				{
					model.PERNATION=ds.Tables[0].Rows[0]["PERNATION"].ToString();
				}
				if(ds.Tables[0].Rows[0]["WTCOMPCODE"]!=null && ds.Tables[0].Rows[0]["WTCOMPCODE"].ToString()!="")
				{
					model.WTCOMPCODE=ds.Tables[0].Rows[0]["WTCOMPCODE"].ToString();
				}
				if(ds.Tables[0].Rows[0]["DANGAN_GONFZI"]!=null && ds.Tables[0].Rows[0]["DANGAN_GONFZI"].ToString()!="")
				{
					model.DANGAN_GONFZI=ds.Tables[0].Rows[0]["DANGAN_GONFZI"].ToString();
				}
				if(ds.Tables[0].Rows[0]["BABYINTIME"]!=null && ds.Tables[0].Rows[0]["BABYINTIME"].ToString()!="")
				{
					model.BABYINTIME=ds.Tables[0].Rows[0]["BABYINTIME"].ToString();
				}
				if(ds.Tables[0].Rows[0]["GSINTIME"]!=null && ds.Tables[0].Rows[0]["GSINTIME"].ToString()!="")
				{
					model.GSINTIME=ds.Tables[0].Rows[0]["GSINTIME"].ToString();
				}
				if(ds.Tables[0].Rows[0]["PERSONBABY"]!=null && ds.Tables[0].Rows[0]["PERSONBABY"].ToString()!="")
				{
					model.PERSONBABY=ds.Tables[0].Rows[0]["PERSONBABY"].ToString();
				}
				if(ds.Tables[0].Rows[0]["PERSONBABYJS"]!=null && ds.Tables[0].Rows[0]["PERSONBABYJS"].ToString()!="")
				{
					model.PERSONBABYJS=ds.Tables[0].Rows[0]["PERSONBABYJS"].ToString();
				}
				if(ds.Tables[0].Rows[0]["PERSONGS"]!=null && ds.Tables[0].Rows[0]["PERSONGS"].ToString()!="")
				{
					model.PERSONGS=ds.Tables[0].Rows[0]["PERSONGS"].ToString();
				}
				if(ds.Tables[0].Rows[0]["PERSONGSJS"]!=null && ds.Tables[0].Rows[0]["PERSONGSJS"].ToString()!="")
				{
					model.PERSONGSJS=ds.Tables[0].Rows[0]["PERSONGSJS"].ToString();
				}
				if(ds.Tables[0].Rows[0]["PERSONDFJS"]!=null && ds.Tables[0].Rows[0]["PERSONDFJS"].ToString()!="")
				{
					model.PERSONDFJS=ds.Tables[0].Rows[0]["PERSONDFJS"].ToString();
				}
				if(ds.Tables[0].Rows[0]["BIANHAOOLD"]!=null && ds.Tables[0].Rows[0]["BIANHAOOLD"].ToString()!="")
				{
					model.BIANHAOOLD=ds.Tables[0].Rows[0]["BIANHAOOLD"].ToString();
				}
				return model;
			}
			else
			{
				return null;
			}
		}

		/// <summary>
		/// 获得数据列表
		/// </summary>
		public DataSet GetList(string strWhere)
		{
			StringBuilder strSql=new StringBuilder();
			strSql.Append("select PERSONID,xm,PERSONTYPE,xb,csrq,PERSONPOLIT,PERSONEDU,ygzdw,PERSONCTYPE,PERSONZHIWU,ydwdz,COMPPERSON,COMPMAN,COMPTEL,PERSONWTYPE,PERSONWPTYPE,xgsmc,PERSONWCTYPE,PERSONPROF1,PERSONPROFDATE,PERSONSET,PERSONAREA,PERSONINDATE,PERSONOUTDATE,PERSONHTBEGDATE,PERSONHTENDDATE,PERSONWORKDATE,PERSONDAF,PERSONDAFJS,PERSONSBF,PERSONSBFJS,PERSONYLF,PERSONYLFJS,PERSONZF,PERSONZFJS,PERSONDF,LIEBIE,sfzh,byyx,bysj,SPEC,hjdz,lxdh,gzjl,PERSONMARRY,PERSONWNAME,PERSONW_COMP,PERSONWTEL,PERSONZHUZHI,PERSONHUKOU,PERSONYLJ,PERSONDNGZ1,PERSONDNGZ2,REMARK1,BIANHAO,RDDATE,ZZDATE,YB,OTHERGL,DISCOUNTGL,ZDBEGIN,ZDEND,PERSONSYJS,PERSONSY,USERNAME,LCAREA,PERSONZIP,OLDCOMP,LIUDTIME,TIAOZTIME,DASAVE,DAOUT,DAOUTTIME,DAOUTNAME,YLJINTIME,YLINTIME,ZFINTIME,SYINTIME,FAMILY,REMARK,PERSONPROF,PERNATION,WTCOMPCODE,DANGAN_GONFZI,BABYINTIME,GSINTIME,PERSONBABY,PERSONBABYJS,PERSONGS,PERSONGSJS,PERSONDFJS,BIANHAOOLD ");
			strSql.Append(" FROM hsrcsc ");
			if(strWhere.Trim()!="")
			{
				strSql.Append(" where "+strWhere);
			}
			return DbHelperSQL.Query(strSql.ToString());
		}

		/// <summary>
		/// 获得前几行数据
		/// </summary>
		public DataSet GetList(int Top,string strWhere,string filedOrder)
		{
			StringBuilder strSql=new StringBuilder();
			strSql.Append("select ");
			if(Top>0)
			{
				strSql.Append(" top "+Top.ToString());
			}
			strSql.Append(" PERSONID,xm,PERSONTYPE,xb,csrq,PERSONPOLIT,PERSONEDU,ygzdw,PERSONCTYPE,PERSONZHIWU,ydwdz,COMPPERSON,COMPMAN,COMPTEL,PERSONWTYPE,PERSONWPTYPE,xgsmc,PERSONWCTYPE,PERSONPROF1,PERSONPROFDATE,PERSONSET,PERSONAREA,PERSONINDATE,PERSONOUTDATE,PERSONHTBEGDATE,PERSONHTENDDATE,PERSONWORKDATE,PERSONDAF,PERSONDAFJS,PERSONSBF,PERSONSBFJS,PERSONYLF,PERSONYLFJS,PERSONZF,PERSONZFJS,PERSONDF,LIEBIE,sfzh,byyx,bysj,SPEC,hjdz,lxdh,gzjl,PERSONMARRY,PERSONWNAME,PERSONW_COMP,PERSONWTEL,PERSONZHUZHI,PERSONHUKOU,PERSONYLJ,PERSONDNGZ1,PERSONDNGZ2,REMARK1,BIANHAO,RDDATE,ZZDATE,YB,OTHERGL,DISCOUNTGL,ZDBEGIN,ZDEND,PERSONSYJS,PERSONSY,USERNAME,LCAREA,PERSONZIP,OLDCOMP,LIUDTIME,TIAOZTIME,DASAVE,DAOUT,DAOUTTIME,DAOUTNAME,YLJINTIME,YLINTIME,ZFINTIME,SYINTIME,FAMILY,REMARK,PERSONPROF,PERNATION,WTCOMPCODE,DANGAN_GONFZI,BABYINTIME,GSINTIME,PERSONBABY,PERSONBABYJS,PERSONGS,PERSONGSJS,PERSONDFJS,BIANHAOOLD ");
			strSql.Append(" FROM hsrcsc ");
			if(strWhere.Trim()!="")
			{
				strSql.Append(" where "+strWhere);
			}
			strSql.Append(" order by " + filedOrder);
			return DbHelperSQL.Query(strSql.ToString());
		}

		/// <summary>
		/// 获取记录总数
		/// </summary>
		public int GetRecordCount(string strWhere)
		{
			StringBuilder strSql=new StringBuilder();
			strSql.Append("select count(1) FROM hsrcsc ");
			if(strWhere.Trim()!="")
			{
				strSql.Append(" where "+strWhere);
			}
			object obj = DbHelperSQL.GetSingle(strSql.ToString());
			if (obj == null)
			{
				return 0;
			}
			else
			{
				return Convert.ToInt32(obj);
			}
		}
		/// <summary>
		/// 分页获取数据列表
		/// </summary>
		public DataSet GetListByPage(string strWhere, string orderby, int startIndex, int endIndex)
		{
			StringBuilder strSql=new StringBuilder();
			strSql.Append("SELECT * FROM ( ");
			strSql.Append(" SELECT ROW_NUMBER() OVER (");
			if (!string.IsNullOrEmpty(orderby.Trim()))
			{
				strSql.Append("order by T." + orderby );
			}
			else
			{
				strSql.Append("order by T. desc");
			}
			strSql.Append(")AS Row, T.*  from hsrcsc T ");
			if (!string.IsNullOrEmpty(strWhere.Trim()))
			{
				strSql.Append(" WHERE " + strWhere);
			}
			strSql.Append(" ) TT");
			strSql.AppendFormat(" WHERE TT.Row between {0} and {1}", startIndex, endIndex);
			return DbHelperSQL.Query(strSql.ToString());
		}

		/*
		/// <summary>
		/// 分页获取数据列表
		/// </summary>
		public DataSet GetList(int PageSize,int PageIndex,string strWhere)
		{
			SqlParameter[] parameters = {
					new SqlParameter("@tblName", SqlDbType.VarChar, 255),
					new SqlParameter("@fldName", SqlDbType.VarChar, 255),
					new SqlParameter("@PageSize", SqlDbType.Int),
					new SqlParameter("@PageIndex", SqlDbType.Int),
					new SqlParameter("@IsReCount", SqlDbType.Bit),
					new SqlParameter("@OrderType", SqlDbType.Bit),
					new SqlParameter("@strWhere", SqlDbType.VarChar,1000),
					};
			parameters[0].Value = "hsrcsc";
			parameters[1].Value = "";
			parameters[2].Value = PageSize;
			parameters[3].Value = PageIndex;
			parameters[4].Value = 0;
			parameters[5].Value = 0;
			parameters[6].Value = strWhere;	
			return DbHelperSQL.RunProcedure("UP_GetRecordByPage",parameters,"ds");
		}*/

		#endregion  Method
        /// <summary>
        /// 获得数据列表
        /// </summary>
        public List<hsgsSHXX.Model.hsrcsc> DataTableToList(DataTable dt)
        {
            List<hsgsSHXX.Model.hsrcsc> modelList = new List<hsgsSHXX.Model.hsrcsc>();
            int rowsCount = dt.Rows.Count;
            if (rowsCount > 0)
            {
                hsgsSHXX.Model.hsrcsc model;
                for (int n = 0; n < rowsCount; n++)
                {
                    model = new hsgsSHXX.Model.hsrcsc();
                    //if (dt.Rows[n]["PERSONID"] != null && dt.Rows[n]["PERSONID"].ToString() != "")
                    //{
                    //    model.PERSONID = decimal.Parse(dt.Rows[n]["PERSONID"].ToString());
                    //}
                    if (dt.Rows[n]["xm"] != null && dt.Rows[n]["xm"].ToString() != "")
                    {
                        model.xm = dt.Rows[n]["xm"].ToString();
                    }
                    //if (dt.Rows[n]["PERSONTYPE"] != null && dt.Rows[n]["PERSONTYPE"].ToString() != "")
                    //{
                    //    model.PERSONTYPE = dt.Rows[n]["PERSONTYPE"].ToString();
                    //}
                    if (dt.Rows[n]["xb"] != null && dt.Rows[n]["xb"].ToString() != "")
                    {
                        model.xb = dt.Rows[n]["xb"].ToString();
                    }
                    if (dt.Rows[n]["csrq"] != null && dt.Rows[n]["csrq"].ToString() != "")
                    {
                        model.csrq = DateTime.Parse(dt.Rows[n]["csrq"].ToString());
                    }
                    //if (dt.Rows[n]["PERSONPOLIT"] != null && dt.Rows[n]["PERSONPOLIT"].ToString() != "")
                    //{
                    //    model.PERSONPOLIT = dt.Rows[n]["PERSONPOLIT"].ToString();
                    //}
                    //if (dt.Rows[n]["PERSONEDU"] != null && dt.Rows[n]["PERSONEDU"].ToString() != "")
                    //{
                    //    model.PERSONEDU = dt.Rows[n]["PERSONEDU"].ToString();
                    //}
                    if (dt.Rows[n]["ygzdw"] != null && dt.Rows[n]["ygzdw"].ToString() != "")
                    {
                        model.ygzdw = dt.Rows[n]["ygzdw"].ToString();
                    }
                    //if (dt.Rows[n]["PERSONCTYPE"] != null && dt.Rows[n]["PERSONCTYPE"].ToString() != "")
                    //{
                    //    model.PERSONCTYPE = dt.Rows[n]["PERSONCTYPE"].ToString();
                    //}
                    //if (dt.Rows[n]["PERSONZHIWU"] != null && dt.Rows[n]["PERSONZHIWU"].ToString() != "")
                    //{
                    //    model.PERSONZHIWU = dt.Rows[n]["PERSONZHIWU"].ToString();
                    //}
                    if (dt.Rows[n]["ydwdz"] != null && dt.Rows[n]["ydwdz"].ToString() != "")
                    {
                        model.ydwdz = dt.Rows[n]["ydwdz"].ToString();
                    }
                    //if (dt.Rows[n]["COMPPERSON"] != null && dt.Rows[n]["COMPPERSON"].ToString() != "")
                    //{
                    //    model.COMPPERSON = dt.Rows[n]["COMPPERSON"].ToString();
                    //}
                    //if (dt.Rows[n]["COMPMAN"] != null && dt.Rows[n]["COMPMAN"].ToString() != "")
                    //{
                    //    model.COMPMAN = dt.Rows[n]["COMPMAN"].ToString();
                    //}
                    //if (dt.Rows[n]["COMPTEL"] != null && dt.Rows[n]["COMPTEL"].ToString() != "")
                    //{
                    //    model.COMPTEL = dt.Rows[n]["COMPTEL"].ToString();
                    //}
                    //if (dt.Rows[n]["PERSONWTYPE"] != null && dt.Rows[n]["PERSONWTYPE"].ToString() != "")
                    //{
                    //    model.PERSONWTYPE = dt.Rows[n]["PERSONWTYPE"].ToString();
                    //}
                    //if (dt.Rows[n]["PERSONWPTYPE"] != null && dt.Rows[n]["PERSONWPTYPE"].ToString() != "")
                    //{
                    //    model.PERSONWPTYPE = dt.Rows[n]["PERSONWPTYPE"].ToString();
                    //}
                    if (dt.Rows[n]["xgsmc"] != null && dt.Rows[n]["xgsmc"].ToString() != "")
                    {
                        model.xgsmc = dt.Rows[n]["xgsmc"].ToString();
                    }
                    //if (dt.Rows[n]["PERSONWCTYPE"] != null && dt.Rows[n]["PERSONWCTYPE"].ToString() != "")
                    //{
                    //    model.PERSONWCTYPE = dt.Rows[n]["PERSONWCTYPE"].ToString();
                    //}
                    //if (dt.Rows[n]["PERSONPROF1"] != null && dt.Rows[n]["PERSONPROF1"].ToString() != "")
                    //{
                    //    model.PERSONPROF1 = dt.Rows[n]["PERSONPROF1"].ToString();
                    //}
                    //if (dt.Rows[n]["PERSONPROFDATE"] != null && dt.Rows[n]["PERSONPROFDATE"].ToString() != "")
                    //{
                    //    model.PERSONPROFDATE = DateTime.Parse(dt.Rows[n]["PERSONPROFDATE"].ToString());
                    //}
                    //if (dt.Rows[n]["PERSONSET"] != null && dt.Rows[n]["PERSONSET"].ToString() != "")
                    //{
                    //    model.PERSONSET = dt.Rows[n]["PERSONSET"].ToString();
                    //}
                    //if (dt.Rows[n]["PERSONAREA"] != null && dt.Rows[n]["PERSONAREA"].ToString() != "")
                    //{
                    //    model.PERSONAREA = dt.Rows[n]["PERSONAREA"].ToString();
                    //}
                    //if (dt.Rows[n]["PERSONINDATE"] != null && dt.Rows[n]["PERSONINDATE"].ToString() != "")
                    //{
                    //    model.PERSONINDATE = DateTime.Parse(dt.Rows[n]["PERSONINDATE"].ToString());
                    //}
                    //if (dt.Rows[n]["PERSONOUTDATE"] != null && dt.Rows[n]["PERSONOUTDATE"].ToString() != "")
                    //{
                    //    model.PERSONOUTDATE = DateTime.Parse(dt.Rows[n]["PERSONOUTDATE"].ToString());
                    //}
                    //if (dt.Rows[n]["PERSONHTBEGDATE"] != null && dt.Rows[n]["PERSONHTBEGDATE"].ToString() != "")
                    //{
                    //    model.PERSONHTBEGDATE = DateTime.Parse(dt.Rows[n]["PERSONHTBEGDATE"].ToString());
                    //}
                    //if (dt.Rows[n]["PERSONHTENDDATE"] != null && dt.Rows[n]["PERSONHTENDDATE"].ToString() != "")
                    //{
                    //    model.PERSONHTENDDATE = DateTime.Parse(dt.Rows[n]["PERSONHTENDDATE"].ToString());
                    //}
                    //if (dt.Rows[n]["PERSONWORKDATE"] != null && dt.Rows[n]["PERSONWORKDATE"].ToString() != "")
                    //{
                    //    model.PERSONWORKDATE = DateTime.Parse(dt.Rows[n]["PERSONWORKDATE"].ToString());
                    //}
                    //if (dt.Rows[n]["PERSONDAF"] != null && dt.Rows[n]["PERSONDAF"].ToString() != "")
                    //{
                    //    model.PERSONDAF = DateTime.Parse(dt.Rows[n]["PERSONDAF"].ToString());
                    //}
                    //if (dt.Rows[n]["PERSONDAFJS"] != null && dt.Rows[n]["PERSONDAFJS"].ToString() != "")
                    //{
                    //    model.PERSONDAFJS = decimal.Parse(dt.Rows[n]["PERSONDAFJS"].ToString());
                    //}
                    //if (dt.Rows[n]["PERSONSBF"] != null && dt.Rows[n]["PERSONSBF"].ToString() != "")
                    //{
                    //    model.PERSONSBF = DateTime.Parse(dt.Rows[n]["PERSONSBF"].ToString());
                    //}
                    //if (dt.Rows[n]["PERSONSBFJS"] != null && dt.Rows[n]["PERSONSBFJS"].ToString() != "")
                    //{
                    //    model.PERSONSBFJS = decimal.Parse(dt.Rows[n]["PERSONSBFJS"].ToString());
                    //}
                    //if (dt.Rows[n]["PERSONYLF"] != null && dt.Rows[n]["PERSONYLF"].ToString() != "")
                    //{
                    //    model.PERSONYLF = DateTime.Parse(dt.Rows[n]["PERSONYLF"].ToString());
                    //}
                    //if (dt.Rows[n]["PERSONYLFJS"] != null && dt.Rows[n]["PERSONYLFJS"].ToString() != "")
                    //{
                    //    model.PERSONYLFJS = decimal.Parse(dt.Rows[n]["PERSONYLFJS"].ToString());
                    //}
                    //if (dt.Rows[n]["PERSONZF"] != null && dt.Rows[n]["PERSONZF"].ToString() != "")
                    //{
                    //    model.PERSONZF = dt.Rows[n]["PERSONZF"].ToString();
                    //}
                    //if (dt.Rows[n]["PERSONZFJS"] != null && dt.Rows[n]["PERSONZFJS"].ToString() != "")
                    //{
                    //    model.PERSONZFJS = dt.Rows[n]["PERSONZFJS"].ToString();
                    //}
                    //if (dt.Rows[n]["PERSONDF"] != null && dt.Rows[n]["PERSONDF"].ToString() != "")
                    //{
                    //    model.PERSONDF = dt.Rows[n]["PERSONDF"].ToString();
                    //}
                    //if (dt.Rows[n]["LIEBIE"] != null && dt.Rows[n]["LIEBIE"].ToString() != "")
                    //{
                    //    model.LIEBIE = dt.Rows[n]["LIEBIE"].ToString();
                    //}
                    if (dt.Rows[n]["sfzh"] != null && dt.Rows[n]["sfzh"].ToString() != "")
                    {
                        model.sfzh = dt.Rows[n]["sfzh"].ToString();
                    }
                    if (dt.Rows[n]["byyx"] != null && dt.Rows[n]["byyx"].ToString() != "")
                    {
                        model.byyx = dt.Rows[n]["byyx"].ToString();
                    }
                    if (dt.Rows[n]["bysj"] != null && dt.Rows[n]["bysj"].ToString() != "")
                    {
                        model.bysj = DateTime.Parse(dt.Rows[n]["bysj"].ToString());
                    }
                    //if (dt.Rows[n]["SPEC"] != null && dt.Rows[n]["SPEC"].ToString() != "")
                    //{
                    //    model.SPEC = dt.Rows[n]["SPEC"].ToString();
                    //}
                    if (dt.Rows[n]["hjdz"] != null && dt.Rows[n]["hjdz"].ToString() != "")
                    {
                        model.hjdz = dt.Rows[n]["hjdz"].ToString();
                    }
                    if (dt.Rows[n]["lxdh"] != null && dt.Rows[n]["lxdh"].ToString() != "")
                    {
                        model.lxdh = dt.Rows[n]["lxdh"].ToString();
                    }
                    if (dt.Rows[n]["gzjl"] != null && dt.Rows[n]["gzjl"].ToString() != "")
                    {
                        model.gzjl = dt.Rows[n]["gzjl"].ToString();
                    }
                    //if (dt.Rows[n]["PERSONMARRY"] != null && dt.Rows[n]["PERSONMARRY"].ToString() != "")
                    //{
                    //    model.PERSONMARRY = dt.Rows[n]["PERSONMARRY"].ToString();
                    //}
                    //if (dt.Rows[n]["PERSONWNAME"] != null && dt.Rows[n]["PERSONWNAME"].ToString() != "")
                    //{
                    //    model.PERSONWNAME = dt.Rows[n]["PERSONWNAME"].ToString();
                    //}
                    //if (dt.Rows[n]["PERSONW_COMP"] != null && dt.Rows[n]["PERSONW_COMP"].ToString() != "")
                    //{
                    //    model.PERSONW_COMP = dt.Rows[n]["PERSONW_COMP"].ToString();
                    //}
                    //if (dt.Rows[n]["PERSONWTEL"] != null && dt.Rows[n]["PERSONWTEL"].ToString() != "")
                    //{
                    //    model.PERSONWTEL = dt.Rows[n]["PERSONWTEL"].ToString();
                    //}
                    //if (dt.Rows[n]["PERSONZHUZHI"] != null && dt.Rows[n]["PERSONZHUZHI"].ToString() != "")
                    //{
                    //    model.PERSONZHUZHI = dt.Rows[n]["PERSONZHUZHI"].ToString();
                    //}
                    //if (dt.Rows[n]["PERSONHUKOU"] != null && dt.Rows[n]["PERSONHUKOU"].ToString() != "")
                    //{
                    //    model.PERSONHUKOU = dt.Rows[n]["PERSONHUKOU"].ToString();
                    //}
                    //if (dt.Rows[n]["PERSONYLJ"] != null && dt.Rows[n]["PERSONYLJ"].ToString() != "")
                    //{
                    //    model.PERSONYLJ = dt.Rows[n]["PERSONYLJ"].ToString();
                    //}
                    //if (dt.Rows[n]["PERSONDNGZ1"] != null && dt.Rows[n]["PERSONDNGZ1"].ToString() != "")
                    //{
                    //    model.PERSONDNGZ1 = dt.Rows[n]["PERSONDNGZ1"].ToString();
                    //}
                    //if (dt.Rows[n]["PERSONDNGZ2"] != null && dt.Rows[n]["PERSONDNGZ2"].ToString() != "")
                    //{
                    //    model.PERSONDNGZ2 = dt.Rows[n]["PERSONDNGZ2"].ToString();
                    //}
                    //if (dt.Rows[n]["REMARK1"] != null && dt.Rows[n]["REMARK1"].ToString() != "")
                    //{
                    //    model.REMARK1 = dt.Rows[n]["REMARK1"].ToString();
                    //}
                    //if (dt.Rows[n]["BIANHAO"] != null && dt.Rows[n]["BIANHAO"].ToString() != "")
                    //{
                    //    model.BIANHAO = dt.Rows[n]["BIANHAO"].ToString();
                    //}
                    //if (dt.Rows[n]["RDDATE"] != null && dt.Rows[n]["RDDATE"].ToString() != "")
                    //{
                    //    model.RDDATE = DateTime.Parse(dt.Rows[n]["RDDATE"].ToString());
                    //}
                    //if (dt.Rows[n]["ZZDATE"] != null && dt.Rows[n]["ZZDATE"].ToString() != "")
                    //{
                    //    model.ZZDATE = DateTime.Parse(dt.Rows[n]["ZZDATE"].ToString());
                    //}
                    //if (dt.Rows[n]["YB"] != null && dt.Rows[n]["YB"].ToString() != "")
                    //{
                    //    model.YB = dt.Rows[n]["YB"].ToString();
                    //}
                    //if (dt.Rows[n]["OTHERGL"] != null && dt.Rows[n]["OTHERGL"].ToString() != "")
                    //{
                    //    model.OTHERGL = dt.Rows[n]["OTHERGL"].ToString();
                    //}
                    //if (dt.Rows[n]["DISCOUNTGL"] != null && dt.Rows[n]["DISCOUNTGL"].ToString() != "")
                    //{
                    //    model.DISCOUNTGL = dt.Rows[n]["DISCOUNTGL"].ToString();
                    //}
                    //if (dt.Rows[n]["ZDBEGIN"] != null && dt.Rows[n]["ZDBEGIN"].ToString() != "")
                    //{
                    //    model.ZDBEGIN = dt.Rows[n]["ZDBEGIN"].ToString();
                    //}
                    //if (dt.Rows[n]["ZDEND"] != null && dt.Rows[n]["ZDEND"].ToString() != "")
                    //{
                    //    model.ZDEND = dt.Rows[n]["ZDEND"].ToString();
                    //}
                    //if (dt.Rows[n]["PERSONSYJS"] != null && dt.Rows[n]["PERSONSYJS"].ToString() != "")
                    //{
                    //    model.PERSONSYJS = dt.Rows[n]["PERSONSYJS"].ToString();
                    //}
                    //if (dt.Rows[n]["PERSONSY"] != null && dt.Rows[n]["PERSONSY"].ToString() != "")
                    //{
                    //    model.PERSONSY = dt.Rows[n]["PERSONSY"].ToString();
                    //}
                    //if (dt.Rows[n]["USERNAME"] != null && dt.Rows[n]["USERNAME"].ToString() != "")
                    //{
                    //    model.USERNAME = dt.Rows[n]["USERNAME"].ToString();
                    //}
                    //if (dt.Rows[n]["LCAREA"] != null && dt.Rows[n]["LCAREA"].ToString() != "")
                    //{
                    //    model.LCAREA = dt.Rows[n]["LCAREA"].ToString();
                    //}
                    //if (dt.Rows[n]["PERSONZIP"] != null && dt.Rows[n]["PERSONZIP"].ToString() != "")
                    //{
                    //    model.PERSONZIP = dt.Rows[n]["PERSONZIP"].ToString();
                    //}
                    //if (dt.Rows[n]["OLDCOMP"] != null && dt.Rows[n]["OLDCOMP"].ToString() != "")
                    //{
                    //    model.OLDCOMP = dt.Rows[n]["OLDCOMP"].ToString();
                    //}
                    //if (dt.Rows[n]["LIUDTIME"] != null && dt.Rows[n]["LIUDTIME"].ToString() != "")
                    //{
                    //    model.LIUDTIME = dt.Rows[n]["LIUDTIME"].ToString();
                    //}
                    //if (dt.Rows[n]["TIAOZTIME"] != null && dt.Rows[n]["TIAOZTIME"].ToString() != "")
                    //{
                    //    model.TIAOZTIME = dt.Rows[n]["TIAOZTIME"].ToString();
                    //}
                    //if (dt.Rows[n]["DASAVE"] != null && dt.Rows[n]["DASAVE"].ToString() != "")
                    //{
                    //    model.DASAVE = dt.Rows[n]["DASAVE"].ToString();
                    //}
                    //if (dt.Rows[n]["DAOUT"] != null && dt.Rows[n]["DAOUT"].ToString() != "")
                    //{
                    //    model.DAOUT = dt.Rows[n]["DAOUT"].ToString();
                    //}
                    //if (dt.Rows[n]["DAOUTTIME"] != null && dt.Rows[n]["DAOUTTIME"].ToString() != "")
                    //{
                    //    model.DAOUTTIME = dt.Rows[n]["DAOUTTIME"].ToString();
                    //}
                    //if (dt.Rows[n]["DAOUTNAME"] != null && dt.Rows[n]["DAOUTNAME"].ToString() != "")
                    //{
                    //    model.DAOUTNAME = dt.Rows[n]["DAOUTNAME"].ToString();
                    //}
                    //if (dt.Rows[n]["YLJINTIME"] != null && dt.Rows[n]["YLJINTIME"].ToString() != "")
                    //{
                    //    model.YLJINTIME = dt.Rows[n]["YLJINTIME"].ToString();
                    //}
                    //if (dt.Rows[n]["YLINTIME"] != null && dt.Rows[n]["YLINTIME"].ToString() != "")
                    //{
                    //    model.YLINTIME = dt.Rows[n]["YLINTIME"].ToString();
                    //}
                    //if (dt.Rows[n]["ZFINTIME"] != null && dt.Rows[n]["ZFINTIME"].ToString() != "")
                    //{
                    //    model.ZFINTIME = dt.Rows[n]["ZFINTIME"].ToString();
                    //}
                    //if (dt.Rows[n]["SYINTIME"] != null && dt.Rows[n]["SYINTIME"].ToString() != "")
                    //{
                    //    model.SYINTIME = dt.Rows[n]["SYINTIME"].ToString();
                    //}
                    //if (dt.Rows[n]["FAMILY"] != null && dt.Rows[n]["FAMILY"].ToString() != "")
                    //{
                    //    model.FAMILY = dt.Rows[n]["FAMILY"].ToString();
                    //}
                    //if (dt.Rows[n]["REMARK"] != null && dt.Rows[n]["REMARK"].ToString() != "")
                    //{
                    //    model.REMARK = dt.Rows[n]["REMARK"].ToString();
                    //}
                    //if (dt.Rows[n]["PERSONPROF"] != null && dt.Rows[n]["PERSONPROF"].ToString() != "")
                    //{
                    //    model.PERSONPROF = dt.Rows[n]["PERSONPROF"].ToString();
                    //}
                    //if (dt.Rows[n]["PERNATION"] != null && dt.Rows[n]["PERNATION"].ToString() != "")
                    //{
                    //    model.PERNATION = dt.Rows[n]["PERNATION"].ToString();
                    //}
                    //if (dt.Rows[n]["WTCOMPCODE"] != null && dt.Rows[n]["WTCOMPCODE"].ToString() != "")
                    //{
                    //    model.WTCOMPCODE = dt.Rows[n]["WTCOMPCODE"].ToString();
                    //}
                    //if (dt.Rows[n]["DANGAN_GONFZI"] != null && dt.Rows[n]["DANGAN_GONFZI"].ToString() != "")
                    //{
                    //    model.DANGAN_GONFZI = dt.Rows[n]["DANGAN_GONFZI"].ToString();
                    //}
                    //if (dt.Rows[n]["BABYINTIME"] != null && dt.Rows[n]["BABYINTIME"].ToString() != "")
                    //{
                    //    model.BABYINTIME = dt.Rows[n]["BABYINTIME"].ToString();
                    //}
                    //if (dt.Rows[n]["GSINTIME"] != null && dt.Rows[n]["GSINTIME"].ToString() != "")
                    //{
                    //    model.GSINTIME = dt.Rows[n]["GSINTIME"].ToString();
                    //}
                    //if (dt.Rows[n]["PERSONBABY"] != null && dt.Rows[n]["PERSONBABY"].ToString() != "")
                    //{
                    //    model.PERSONBABY = dt.Rows[n]["PERSONBABY"].ToString();
                    //}
                    //if (dt.Rows[n]["PERSONBABYJS"] != null && dt.Rows[n]["PERSONBABYJS"].ToString() != "")
                    //{
                    //    model.PERSONBABYJS = dt.Rows[n]["PERSONBABYJS"].ToString();
                    //}
                    //if (dt.Rows[n]["PERSONGS"] != null && dt.Rows[n]["PERSONGS"].ToString() != "")
                    //{
                    //    model.PERSONGS = dt.Rows[n]["PERSONGS"].ToString();
                    //}
                    //if (dt.Rows[n]["PERSONGSJS"] != null && dt.Rows[n]["PERSONGSJS"].ToString() != "")
                    //{
                    //    model.PERSONGSJS = dt.Rows[n]["PERSONGSJS"].ToString();
                    //}
                    //if (dt.Rows[n]["PERSONDFJS"] != null && dt.Rows[n]["PERSONDFJS"].ToString() != "")
                    //{
                    //    model.PERSONDFJS = dt.Rows[n]["PERSONDFJS"].ToString();
                    //}
                    //if (dt.Rows[n]["BIANHAOOLD"] != null && dt.Rows[n]["BIANHAOOLD"].ToString() != "")
                    //{
                    //    model.BIANHAOOLD = dt.Rows[n]["BIANHAOOLD"].ToString();
                    //}
                    modelList.Add(model);
                }
            }
            return modelList;
        }
        public List<Model.hsrcsc> GetFondListByPage(int pageSize, int pageIndex, string strWhere, string fOrderFiled, out int total)
        {
            if (fOrderFiled == "")
            {
                fOrderFiled = "PERSONID desc";
            }
            SqlParameter[] parameters = {  
                    new SqlParameter("@tableName", SqlDbType.VarChar, 50),  
                    new SqlParameter("@fields", SqlDbType.VarChar, 2000),  
                    new SqlParameter("@orderField", SqlDbType.VarChar, 500),  
                    new SqlParameter("@sqlWhere", SqlDbType.VarChar,2000),  
                    new SqlParameter("@pageSize", SqlDbType.Int),  
                    new SqlParameter("@pageIndex", SqlDbType.Int),  
                    new SqlParameter("@TotalPage", SqlDbType.Int),
                    new SqlParameter("@TotalRecordCount", SqlDbType.Int) 
                    };

            parameters[0].Value = "hsrcsc";
            parameters[1].Value = "xm,xb,csrq,ygzdw,ydwdz,xgsmc,sfzh,byyx,bysj,hjdz,lxdh,gzjl";
            parameters[2].Value = fOrderFiled;
            parameters[3].Value = strWhere;
            parameters[4].Value = pageSize;
            parameters[5].Value = pageIndex;
            parameters[6].Direction = ParameterDirection.Output;
            parameters[7].Direction = ParameterDirection.Output;
            DataSet ds = DbHelperSQL.RunProcedure("up_GetRecordByPage", parameters, "ds", 60 * 30);
            total = int.Parse(parameters[7].Value.ToString());
            return DataTableToList(ds.Tables[0]);

        }

        
	}
}

